<!DOCTYPE html>
<html>
<head>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title id="doctitle">information</title>
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta content="telephone=no" name="format-detection"/>
    <meta name="screen-orientation" content="portrait">


    <meta name="x5-orientation" content="portrait">

    <link rel="icon" href="favicon.ico" type="image/x-icon">

    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-theme.min.css">
	<link rel="stylesheet" type="text/css" href="css/base.css">
	<link rel="stylesheet" type="text/css" href="css/soHead.css">
	<link rel="stylesheet" tyep="text/css" href="css/result.css">
	 <link rel="stylesheet" type="text/css" href="css/special.css">
	<link rel="stylesheet" href="css/mx-bubble.css" type="text/css" />
	<link rel="stylesheet" href="css/bubbles.css" type="text/css" />

    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="bootstrap/js/respond.min.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="js/echarts/echarts.js"></script>
	
    <!-- yuxi.file -->
    <link rel="stylesheet" type="text/css" href="css/yuxi.css">
    <script src="js/yuxi.js"></script>

    <script src="json/specialTopic.js"></script>
    <script src="js/jquery-plugins/jquery.tmpl.min.js"></script>
    <script src="js/jquery-plugins/jquery.tmplPlus.min.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    


    <script  id="top" type="text/x-jquery-tmpl">
		<div id="head">
		<div class="head_left" style="width:13%">
			<a href="javascript:void(0);" onclick="javascript:window.history.back(-1);" class="headArrLeft" ><img src="images/gongyong_fh.png" class="imgLeft"></a>
		</div>
		<div class="head_title" style="width:64%;">
			<h3 style="text-align:center; padding:0;margin:0;width:100%;" id="informationTitle">${title}</h3>
		</div>
		<div class="head_right" style="padding:0;margin:0;width:18%;">
			<a id="indexTranButton" href="#"><img src="images/index_wz_ico3.png"/></a>
			<a href="searchOne.html" class="head_right_r"><img src="images/index_wz_ico4.png"></a>
		</div>
		</div>
		<!--<div>
			<img src="images/result/result_main.jpg" style="width:100%;height:auto;"/>
		</div>-->
		<div id="tranTxt">
			<p id="txt${index}" class="search_p"><span style="color:#2070d5;"></span></p>
		</div>
    </script>
    <script>
        function loadTop(url){
            //requestData(url ? url : 'json/topicTopEnglish.json', function(data, textStatus, jqXHR){
            //    $('#top').tmpl(data).appendTo('#container');
            //});
        	 var prefix = localStorage.localIP;
     		var url = "inter/articleDetail";	
     		var topic_id = GetQueryString('topic_id') == null ? "" : GetQueryString('topic_id');
     		//if(!url.startsWith('/')){
     		//	prefix += '/';
     		//}
     		var sUrl = prefix + url + '.json';
            $.ajax({
                 url : sUrl,
                 type : "post",
                 dataType:'json',
                 data : {
                     uuid : GetQueryString('uuid'),
                     id : topic_id
                 },
                 success : function(data) {
                     if(data && data != ""){
                         var result =  eval('(' + data + ')');
                         if(result.error){
                             alert(result.error);
                         } else{
                             if(result.ret == 0) {
                                var list = result.data;
                                if(list){
                                	for(var i = 0; i < list.length; i++){
                        				var o = list[i];
                        				o.index = i;
                        		        	if(o.uuid == GetQueryString('uuid')){
                        		        		if(o.title && o.title.length > 13){
                        		        			o.title = o.title.substring(0,13)+'...';
                    		        			}
                        		        		$('#top').tmpl(o).appendTo('#container'); 	
                        		        		$("#txt"+i).html(o.txt);
                        		        	}
                        		        }
                        			}
                                }
                         }
                     }
                     //var i=1;
                     $('#indexTranButton').click(function(){
                     //var ele = $(this).parents("#tranTxt");
                     //translate();
                     var srcl;
                     var tgtl;
                     $.ajax({
             			url : 'http://translateport.yeekit.com:9006/detection',
             			type : "post",
             			dataType:'jsonp',
             			jsonp:'jsoncallback',
             			crossDomain: true,
             			data : {
             				text : $('.search_p').html()
             			},
             			success : function(data) {
             				if(data.result){
             					if(data.result == 'zh'){
             						srcl = "zh";
             						tgtl = "en";
             					}else if(data.result == 'en'){
             						srcl = "en";
             						tgtl = "zh";
             					}else{
             						srcl = "en";
             						tgtl = "zh";
             					}
             				}
             				transBtnClick(srcl,tgtl);
                    // if(i%2 ==0){
                    //	transBtnClick('en','zh'); 
                    // }else{
	                //   	transBtnClick('zh','en');
                    // }
                    // i++;
             			},
             			error : function(XMLHttpRequest, textStatus, errorThrown) {
            			}
                 	});
                  });
                    
                 },
                 error : function(XMLHttpRequest, textStatus, errorThrown) {
                     // alert('系统出现未知异常，请联系系统管理员！');
                 }
             });
          
        }
        
        function translate(){
    		//TODO 暂时没找到翻译多条的方法 这地方暂时调用三遍
    		var url = 'https://translateport.yeekit.com/translate';
    		var param ={  
    	        	"srcl":"zh",
    	        	"tgtl":"en",
    	        	"text":$(".search_p").html(),
    	        	"detoken":true
    	        }
    		$.ajax(url, {
    			data: param,  
    		    dataType: 'json',  
    		    crossDomain: true,  
    		    success: function(data) {  
    		    	$(".search_p").html(data.translation[0].translated[0].text);
    		    }
	    		}); 
    	}
        
        function GetQueryString(name)
		{
			var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if(r!=null)return  unescape(r[2]); return null;
		}
        
        $(function(){
            loadTop();
            $('#indexTranButton').click(function(){
                $(".fanyi").show();
                setTimeout(function(){
                    $('#container').empty();
                    loadTop('json/topicTopChinese.json');
                    $(".fanyi").hide();
                }, 1000);
            });
        });
        
        function hmProxy(url, data, callback){
	        var prefix = localStorage.localIP;
			//if(!url.startsWith('/')){
			//	prefix += '/';
			//}
        	$.ajax({
        		type: 'post',
        		url: prefix + url + '.json?message=' + JSON.stringify(data),
        		dataType: 'json',
        		success: callback
        	});
        }
        
    </script>

</head>

<body>
<div class="headB"></div>
<div id="container">
		<!--<div id="head">
		<div class="head_left">
			<a href="index.html"><img src="images/gongyong_fh.png" style="width:14px; margin-top:2px"></a>
		</div>
		<div class="head_title">
			<h3>General Dynamics’GD 300</h3>
		</div>	
		<div class="head_right">
			<a href="indexTranslate.html"><img src="images/index_wz_ico3.png"/></a>	
			<a href="searchOne.html" class="head_right_r"><img src="images/index_wz_ico4.png"></a>			      		   	
		</div>	  
		</div>
		<div>
			<img src="images/result/result_main.jpg" style="width:100%;height:auto;"/>
		</div>
		<div>
			<p style="font-size:2.0rem;padding:16px 14px;"><span style="color:#2070d5;">General Dynamics GD300 </span>Corporat is American and defense company formed by
				 mergers and divestitures. It is the world's fifth-largest defense contractor based on 
				 2012 revenues. </p>
		</div>-->
</div>
	<div id="bubbles" class="bubbles"></div>
		<div  class="spac_footer">
			<a style="float:left;padding-left:20px;"><img src="images/specialTopic/spac_ico1.png"></a>
			<a href="#" style="text-align:center;"><img src="images/specialTopic/spac_ico2.png"></a>
			<a href="index_share.html" style="float:right;padding-right:20px;"><img src="images/specialTopic/spac_ico3.png"></a>
		</div>
		<div class="ximantansword">暂不提供人工翻译，如有需要请<br/>拨打我公司客服电话：4000000000<div class="arrow"></div></div>
		<div class="ximantansword2">Tap for human translation on this page<div class="arrow"></div></div>
		
		<!-- <script src="js/jsondata-scatter.js"></script> -->
	    <script src="js/myInformationscatter.js"></script>
	    <script type="text/javascript" src="js/jsPDF/iframe.js"></script>
</body>
</html>
